#ifndef _PARAMETERPARSER_H_
#define _PARAMETERPARSER_H_

#include "XMLLoading.h"

#include <vector>
#include <iostream>
#include <ext/hash_map>

using __gnu_cxx::hash_map;
using __gnu_cxx::hash;

using std::string;

class ParameterParser   //Singleton class 
                        //only usable by: 
                        //ParameterParser::getInstance()

                        //main config file must be loaded first
                        //before any argument can be parsed, 
                        //with function loadNewFile
{
    public:
        ~ParameterParser();
        static  ParameterParser*  getInstance();
        string  parseParameter(string toFind, int threadNumber); //if not found: return "";
        void    loadNewFile(string);    //this is the main scenario file
        uint     getNumberOfThreads();
        bool    getVectorLoadedFlag();
        string  getScenarioFilename();  //this is the main scenario file

    private:
        ParameterParser();
        XMLLoading xMLLoader;
        static bool                 instanceFlag;
        static bool                 vectorLoadedFlag;
        static ParameterParser*     instance;
        static std::vector<hash_map<string, string, hash<string>, eqstr> > 
                                    the_vector;
        static string filename;
};

#endif //_PARAMETERPARSER_H_
